package edu.seu.mart.service;

import edu.seu.mart.entity.Pager;
import edu.seu.mart.model.Goods;

import java.util.List;

/**
 * Created by zj on 2015/3/11.
 */
public interface IGoodsService {

    public Pager<Goods> findGoods();

    public Pager<Goods> findGoods(String name);

    public Pager<Goods> findGoodsList(int i);

    public Pager<Goods> findMatchedGoods(String query,String categroy,String saleOrder,String priceOrder);

    public Pager<Goods> findGoodsByNameOrBrand(String name);

    public Pager<Goods> findGoodsListBySellerId(int sellID, String flag);

    public Pager<Goods> findGoodsByCategory(String name);
    public Pager<Goods> findGoodsByCategory(String category,String brand,String price,String CPU,String SaleOrder,String priceOrder);
    public List<Goods> findRecommendGoods(int goodsId, String recommendType);

    public void add(Goods goods);

    public void delete(int id);

    public void delete(String[] ids);

    public void update(int id);

    public void update(Goods goods);

    public Goods load(int id);

    public void updateStatus(int id);

    public void deleteChecked(String[] ids);

    public void updateUnPassStatus(int id);


    public List<Goods> searchIndex(String content);
    public void creatIndexDir();
    public List<Goods> findAllGoods();
    public String getIndexDir();
}
